/*
 * @Author: your name
 * @Date: 2020-11-04 11:06:29
 * @LastEditTime: 2020-11-05 16:16:54
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /crowd-funding/src/components/pages/component/store/imgAndText/index.js
 */
import React from 'react'
import './index.scss'

function ImgAndText(props) {
	const { picUrlList = [], textList = [] } = props.item
	return (
		<div className="ImgAndText">
			{/* 展示图片 */}
			{picUrlList.map((item, index) => {
				const key = `${item}-${index}`
				return (
					<div key={key} className="ImgAndTextUrlList">
						<img src={item} alt="" />
					</div>
				)
			})}

			{/* 展示文字 */}
			{textList.map((item) => {
				return (
					<div key={`${item.title}+${item.text}`} className="textList">
						<p className="textTitle">{item.title}</p>
						<p className="textText">{item.text}</p>
					</div>
				)
			})}
		</div>
	)
}

export default ImgAndText
